<template>
    <div>
         <div @click="back">返回</div> 
         <hr>
         <ul>
             <li v-for="(itmes,index) in sotritems" :key="index">
                {{index+1}}:{{itmes}}
             </li>
         </ul>
    </div>
</template>

<script>
export default {
    name:'/jsp2',
    data(){
        return{
            itme:[1,23,4,5,7,9,10,12]
        }
    },
    computed:{
        sotritems:function(){
            return this.itme.sort(abc)
        }
    },
    methods:{
    back(){
        this.$router.go(-1);//返回上一层
    },
},
}
function abc(a,b){
    return a-b;
}
</script>

